$(document).ready(function ($) {
    var _page = $('.page');
    var user_obj = JSON.parse($(_page).find('input[name=user_obj]').val());
    var target_obj = JSON.parse($(_page).find('input[name=target_obj]').val());
    if (!target_obj.user_id || !target_obj.user_id) {
        return bottlecms.toast("信息错误");
    }
    var dialogue = null;
    dialogue = bottlecms.dialogue.init({
        elem: $(_page).find(".bcui-dialogue"),
        me: user_obj,
        he: target_obj,
        action: "notice"
    });
});

function bc_currency(currency_type, parse) {
    var arr = [];
    arr = {
        'currency_1': {
            'name': "现金",
            'unit': "元",
            'exchange': ""
        },
        'currency_2': {
            'name': "喜糖",
            'unit': "颗",
            'exchange': "1"
        },
        'currency_3': {
            'name': "",
            'unit': "",
            'exchange': ""
        }
    };
    var returnstr = arr;
    if (currency_type) {
        returnstr = arr[currency_type];
        if (parse) {
            returnstr = returnstr[parse];
        }
    }
    return returnstr;
}